<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <script src="http://cdn.bootcss.com/angular.js/1.6.2/angular.js"></script>
    </head>
    <body ng-app="hp" ng-controller="ctrl">
        <button ng-click="fn()">Click Me</button>
    </body>
    <script>
    var ng = angular.module("hp",[]);
    ng.controller("ctrl",["$scope",function($scope){
        $scope.fn = function(){
            alert("You click this button");
        }
    }])
    </script>
</html>